package com.ql.gamelogm.entities;


import org.springframework.data.elasticsearch.annotations.Document;

import java.io.Serializable;
import java.util.Date;

@Document(indexName = "ql" ,type = "DataLog")
public class DataLog implements Serializable {
    private int id;
    /*玩家id*/
    private Long gamerid;
    /*动作id*/
    private Long actionid;
    /*地图*/
    private String map;
    /*地图x轴*/
    private Long mapx;
    /*地图y轴*/
    private Long mapy;
    /*游戏人物名称*/
    private  String gamername;
    /*物品名称*/
    private String itemname;
    /*物品id*/
    private Long itemid;
    /*交易对象*/
    private String tradeto;
    /*被交易对象*/
    private String tradefrom;
    /*时间*/
    private Date date;

    public DataLog() {
    }

    public DataLog(int id,Long gamerid, Long actionid, String map, Long mapx, Long mapy, String gamername, String itemname, Long itemid, String tradeto, String tradefrom, Date date) {
        this.id=id;
        this.gamerid = gamerid;
        this.actionid = actionid;
        this.map = map;
        this.mapx = mapx;
        this.mapy = mapy;
        this.gamername = gamername;
        this.itemname = itemname;
        this.itemid = itemid;
        this.tradeto = tradeto;
        this.tradefrom = tradefrom;
        this.date = date;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public Long getGamerid() {
        return gamerid;
    }

    public void setGamerid(Long gamerid) {
        this.gamerid = gamerid;
    }

    public Long getActionid() {
        return actionid;
    }

    public void setActionid(Long actionid) {
        this.actionid = actionid;
    }

    public String getMap() {
        return map;
    }

    public void setMap(String map) {
        this.map = map;
    }

    public Long getMapx() {
        return mapx;
    }

    public void setMapx(Long mapx) {
        this.mapx = mapx;
    }

    public Long getMapy() {
        return mapy;
    }

    public void setMapy(Long mapy) {
        this.mapy = mapy;
    }

    public String getGamername() {
        return gamername;
    }

    public void setGamername(String gamername) {
        this.gamername = gamername;
    }

    public String getItemname() {
        return itemname;
    }

    public void setItemname(String itemname) {
        this.itemname = itemname;
    }

    public Long getItemid() {
        return itemid;
    }

    public void setItemid(Long itemid) {
        this.itemid = itemid;
    }

    public String getTradeto() {
        return tradeto;
    }

    public void setTradeto(String tradeto) {
        this.tradeto = tradeto;
    }

    public String getTradefrom() {
        return tradefrom;
    }

    public void setTradefrom(String tradefrom) {
        this.tradefrom = tradefrom;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    @Override
    public String toString() {
        return "DataLog{" +
                "id=" + id +
                ", gamerid=" + gamerid +
                ", actionid=" + actionid +
                ", map=" + map +
                ", mapx=" + mapx +
                ", mapy=" + mapy +
                ", gamername='" + gamername + '\'' +
                ", itemname='" + itemname + '\'' +
                ", itemid=" + itemid +
                ", tradeto='" + tradeto + '\'' +
                ", tradefrom='" + tradefrom + '\'' +
                ", date=" + date +
                '}';
    }
}
